package com.yc.springmvc.dao;

import com.yc.springmvc.bean.Person;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface PersonDao {

    //mybatis自动代理实现
    @Insert("insert into Person values(null,#{name},#{age},#{student},#{pwd},#{email},#{birthday},#{phone}) ")
    public void save(Person person);

    @Update("update Person set ")
    public void update(Person person);

    public void delete(String name);

    @Select("select * from Person where name = #{name}")
    public Person getByName(String name);

    public List<Person> getAll();
}
